<template>
    <div>
        <div class="tabitems-box flex flex-align-center flex-pack-center">
            <div class="tabitems-item" @click="onChangeFn(index,item.url)" :class="{active:item.url == menu,arr_two:itemgroup.length == 2}" v-for='(item,index) in itemgroup' :key='index'>
                {{item.name}}
                <div class="line" v-if='item.url == menu'></div>
            </div>
        </div>
    </div>
</template>
<script>
export default {
    data(){
        return {
            
        }
    },
    props:{
        itemgroup: {
            type: Array
        }
    },
    computed: {
        menu(){
            return this.$store.getters.getMenu;
        }
    },
    methods:{
        onChangeFn(index,url){        
            this.$emit("onTabChang", url);
        }
    }
}
</script>
<style lang="less" scoped>
@import url(../../assets/css/common/tabitems.less);
</style>


